-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Skia] feat: Implement Composition Effect system and AcrylicBrush #13812
Conversation
37af2f3
to
fb3a468
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! I am not sure whether it would make sense to separate the Win2D enums and effects into a separate assembly within the solution for more future proofing, but I guess it is not going to be a problem for a considerable time, what do you think @jeromelaban?
@ahmed605 This one is concerning though - Seems like it happens sometime during snapshot tests. You can try to run them locally using this button : Just let it run and hopefully it will fail locally the same way. |
@MartinZikmund I think this is because the SkSL thing under Software Rendering, I disabled SkSL on software rendering locally so it should be fixed. I will try that button and see if it still fails after the fix |
The build 96915 found UI Test snapshots differences: Details
|
The build 97142 found UI Test snapshots differences: Details
|
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
src/Uno.UI.Composition/Composition/CompositionEffectBrush.skia.cs
Outdated
Show resolved
Hide resolved
The build 97650 found UI Test snapshots differences: Details
|
1a0ce5c
to
076118f
Compare
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-13812/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-13812/index.html |
…fectFactory, CompositionBackdropBrush, and CompositionEffectBrush
… an option to re-enable it
07bbfeb
to
3febf50
Compare
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-13812/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-13812/index.html |
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-13812/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-13812/index.html |
The build 115035 found UI Test snapshots differences: Details
|
GitHub Issue (If applicable): closes #10828
PR Type
What kind of change does this PR introduce?
What is the current behavior?
This PR implements the following APIs and effects:
Note
All blend modes are supported except LinearBurn, DarkerColor, LighterColor, LinearDodge, VividLight, LinearLight, PinLight, HardMix, Subtract, and Division, this is because Skia doesn't support them (see: Other information)
Note
This effect is not publicly exposed in the API but can be accessed by manually creating the effect description by implementing IGraphicsEffectD2D1Interop
[no screenshot]
[no screenshot]
[no screenshot]
[no screenshot]
[no screenshot]
What is the new behavior?
Copilot Summary
🤖 Generated by Copilot at 4a47c01
This pull request adds a new sample page
EffectBrushTests
to demonstrate the use ofCompositionEffectBrush
in Uno, and enhances the support for this feature on Skia. It also improves theBasicAcrylicBrushTest
sample by adding some UI controls and layout. To achieve this, it introduces several new classes and enums that implement the Win2D graphics effects API, and modifies some existing classes to handle the effect creation and rendering.PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
To implement the missing blend modes and exceptions mentioned below we need SkiaSharp to update its bindings to include
SKImageFilters::RuntimeShader
andSKColorFilters::Lerp
, then that can be done once we upgrade to Skia 3 since these APIs don't exist in Skia 2. (cc. @mattleibow)All effects are tested against Windows ones, pretty much all of them (with few unnoticeable exceptions) are 1:1 match